package com.alks.function.mapper.stockdept.pcfactorystockquery;

import com.alks.entity.data.entity.PcCuttingCollectDetail;
import com.alks.entity.data.entity.PcCuttingLsLabel;
import com.alks.function.data.dto.stockdept.pcfactorystockwork.CutScanCodeDto;
import com.alks.function.data.request.stockdept.pcfactorystockwork.CuttingRecIoRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ms
 * @since 2024-06-28
 */
public interface PcCuttingLsLabelMapper extends BaseMapper<PcCuttingLsLabel> {

    /**
     * 批量插入部件标签
     * @param waitInsert
     */
    int addPcCuttingLsLabelList(ArrayList waitInsert);

    /**
     * 根据标签扫码查询
     *
     * @param labelNo   标签号
     * @param processNo 收发工艺
     * @param companyId 公司ID
     * @return 返回标签信息
     */
    CutScanCodeDto cuttingScanCodeQuery(@Param("labelNo") String labelNo, @Param("processNo") String processNo, @Param("flag") String flag, @Param("companyId") String companyId);

    int delPcCuttingLsLabelTemp();

    int addPcCuttingLsLabelTemp(@Param("lotNo") String lotNo, @Param("companyId") String companyId);

    int addPcCuttingLsLabelTemp2(@Param("lotNo") String lotNo, @Param("companyId") String companyId);

    /**
     * 半成品出入库标签获取
     *
     * @param request     出入库数据明细
     * @param companyId   公司ID
     * @param processCode 工序号
     * @return 含标签的出入库数据
     */
    List<PcCuttingCollectDetail> cuttingRecDetIo(@Param("request") List<CuttingRecIoRequest> request, @Param("companyId") String companyId, @Param("processCode") String processCode);
}
